import matplotlib.pyplot as plt


# top 1 20 50 80 100

x = [1, 20, 50, 80, 100]

###  1w base probe = 1
# sample rate: 0.01
y_001 = [[0.181, 0.155, 0.147, 0.144, 0.142], # k = 1
         [0.326, 0.270, 0.258, 0.251, 0.247], # k = 2
         [0.437, 0.360, 0.354, 0.344, 0.339]] # k = 3


# sample rate: 0.05
y_005 = [[0.115, 0.080, 0.067, 0.066, 0.068],
         [0.158, 0.118, 0.099, 0.094, 0.094],
         [0.202, 0.151, 0.129, 0.120, 0.119]]

# sample rate: 0.1
y_010 = [[0.150, 0.077, 0.057, 0.056, 0.059],
         [0.186, 0.101, 0.076, 0.074, 0.075],
         [0.203, 0.122, 0.093, 0.089, 0.089]]

# sample rate: 0.5
y_050 = [[0.516, 0.060, 0.038, 0.040, 0.044],
         [0.520, 0.101, 0.076, 0.074, 0.075],
         [0.525, 0.122, 0.093, 0.089, 0.089]]

# adaptive probe = topk
# sample rate: 0.5
y_050_n = [[0.516, 0.584, 0.628, 0.661, 0.680],
           [0.520, 0.705, 0.841, 0.932, 0.969],
           [0.525, 0.809, 0.970, 0.998, 0.999]]

# sample rate: 0.1
y_010_n = [[0.150, 0.417, 0.614, 1.000, 1],
           [0.186, 0.709, 0.986, 1.000, 1],
           [0.203, 0.903, 1.000, 1.000, 1]]

plt.plot(x, y_001[0], y_001[1], y_001[2])
plt.show()




# 10w dataset
# recall@1 - qps

# k = 1
x = [[3190.56, 3170.94, 4488.660, 5159.89, 3377.37, 3791.12, 3684.232, 4075.00, 3866.50, 4125.81, 4233.91],
     [0.141, 0.221, 0.277, 0.384, 0.524, 0.643, 0.733, 0.810, 0.906, 0.950, 0.979]]

x1 = [[3095.85, 3313.60, 3267.66, 3339.94, 3474.77, 3665.67, 3888.17, 4062.10],
      [0.163, 0.219, 0.396, 0.555, 0.717, 0.828, 0.893, 0.933],]